import {DefaultTheme} from "vitepress";

export function webpack5():DefaultTheme.SidebarItem[] {
  return [
    {
      text: 'webpack5介绍',
      items: [
        {text: '基本介绍', link: '/info'},
      ],
    },
    {
      text: '基础',
      base: '/webpack5/base',
      collapsed: false,
      items: [
        {text: '前言', link: '/before'},
        {text: '基本使用', link: '/base'},
        {text: '基本配置', link: '/config'},
        {text: '开发模式介绍', link: '/development'},
        {text: '处理样式资源', link: '/css'},
        {text: '处理图片资源', link: '/image'},
        {text: '修改输出资源的名称和路径', link: '/output'},
        {text: '自动清空上次打包资源', link: '/clean'},
        {text: '处理字体图标资源', link: '/font'},
        {text: '处理其他资源', link: '/other'},
        {text: '处理 js 资源', link: '/javascript'},
        {text: '处理 Html 资源', link: '/html'},
        {text: '开发服务器&自动化', link: '/server'},
        {text: '生产模式介绍', link: '/production'},
        {text: 'Css 处理', link: '/optimizeCss'},
        {text: 'html 压缩', link: '/minifyHtml'},
      ],
    },
    {
      text: '高级',
      base: '/webpack5/senior',
      collapsed: false,
      items: [
        {text: '介绍', link: '/info'},
        {text: '提升开发体验', link: '/enhanceExperience'},
        {text: '提升打包构建速度', link: '/liftingSpeed'},
        {text: '减少代码体积', link: '/reduceVolume'},
        {text: '优化代码运行性能', link: '/optimizePerformance'},
        {text: '总结', link: '/summary'},
      ],
    },
    {
      text: '项目配置',
      base: '/webpack5/project',
      collapsed: false,
      items: [
        {text: '介绍', link: '/README'},
        {text: 'React脚手架', link: '/react-cli'},
        {text: 'Vue脚手架', link: '/vue-cli'},
        {text: '总结', link: '/summary'},
      ],
    },
    {
      text: '原理分析',
      base: '/webpack5/origin',
      collapsed: false,
      items: [
        {text: '介绍', link: '/README'},
        {text: 'Loader 原理', link: '/loader'},
        {text: 'Plugin 原理', link: '/plugin'},
        {text: '总结', link: '/summary'},
      ],
    },
  ]
}